package business;


import demo1.Student;
import demo3.ToShow;

import java.util.ServiceLoader;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: Demo1
 * @date 2020/12/23 23:00
 * @Verson 1.0 -2020/12/23 23:00
 * @see
 */
public class Demo1 {
    public static void main(String[] args) {

        System.out.println("-----调用mode1的Student----");
        Student s = new Student();
        s.show();
        System.out.println("-----调用mode1的服务接口----");
        //加载服务
        ServiceLoader<ToShow> toShows = ServiceLoader.load(ToShow.class);

        //遍历服务
        for(ToShow toShow : toShows) {
            toShow.show();
        }

    }
    
}